<?php
/**
 * 后台秘密工具 平时需要禁用
 * User: crstu
 * Date: 2016/4/28
 * Time: 18:40
 */

namespace backend\controllers;

use yii;
use common\models\DAO\Admin;

class XToolsController extends yii\web\Controller
{

    public function actionResetAdminPass(){
        die;
        $admin = Admin::findOne(1);
        $admin->setScenario('changePassword');
        $pass = Yii::$app->request->get('pass');
        if(!empty($pass)){
            $admin->adminPass = $pass;
            var_dump($admin->save());
        }
    }
}